package com.guoyh.xprodatas.repository.wmodel.project

import com.guoyh.pronet.repository.BaseRepository
import com.guoyh.xprodatas.service.wmodel.project.wModelProjectApi
import kotlinx.coroutines.CoroutineScope
import rxhttp.async

/**
 * @CreateDate: 7/29/21 11:15 AM
 * @Author: guoyh
 * @Description: java类作用描述
 */
class ProjectRemoteRepository : BaseRepository() {


    /**
     * 项目某一个分类 下的列表
     */
    suspend fun getProjectList(scope: CoroutineScope, page: Int, cid: String) =
        wModelProjectApi.getProjectList(page, cid)
            .async(scope).await()


    /**
     * 项目分类列表
     */
    suspend fun getProjectTab(scope: CoroutineScope) =
        wModelProjectApi.getProjectTab()
            .async(scope).await()

}
